From 5739ce6baf9de29afa1645045544942523da4313 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 28 Apr 1993 17:08:18 +0000 Subject: [PATCH] (do_autoload): Fixed the bug in the autoload-saving code. --- src/eval.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/eval.c b/src/eval.c index 445ff088164..8cd05ca7fe1 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1391,7 +1391,6 @@ do_autoload (fundef, funname) Vautoload_queue = Qt; Fload (Fcar (Fcdr (fundef)), Qnil, noninteractive ? Qt : Qnil, Qnil); -#ifdef UNLOAD /* Save the old autoloads, in case we ever do an unload. */ queue = Vautoload_queue; while (CONSP (queue)) @@ -1399,11 +1398,15 @@ do_autoload (fundef, funname) first = Fcar (queue); second = Fcdr (first); first = Fcar (first); - if (!EQ (second, Qnil)) + + /* Note: This test is subtle. The cdr of an autoload-queue entry + may be an atom if the autoload entry was generated by a defalias + or fset. */ + if (CONSP (second)) Fput(first, Qautoload, (Fcdr (second))); + queue = Fcdr (queue); } -#endif /* UNLOAD */ /* Once loading finishes, don't undo it. */ Vautoload_queue = Qt; -- 2.30.2